/**
 * 
 */
package org.tiger.springboot.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tiger.common.domain.ResponseBean;
import org.tiger.springboot.redis.service.IJedisOperateService;

/**
 * @author liuwenlai
 *
 */
@RestController
@RequestMapping("/jedisOperate")
public class JedisOperateController {

	@Autowired
	private IJedisOperateService jedisOperateService;

	@RequestMapping("/test")
	public ResponseBean<Object> test(String key) {
		ResponseBean<Object> bean = jedisOperateService.getObjByKey(key);

		return bean;
	}

	public ResponseBean<Object> setValueBykey(String key, Object value) {
		ResponseBean<Object> bean = jedisOperateService.getObjByKey(key);

		bean.setSuccess(true);
		return bean;
	}

}
